Repository navigation
0.3.4 follow-up: remove no-op auto-depth, fix greedy verify penalty, correct CHANGELOG - #62
Merged
Merged
Conversation
… verify Three defects shipped in #61 (26f3bb4): 1) auto_select_inference_depth never ran on a real checkpoint. It read config.step_sizes, but the trained schedule lives on recurrent_controller.step_sizes in the state dict. ChronosConfig has no step_sizes attribute. Verified by auto_select_inference_depth returning None on a realistic post-load config. The function, its helpers, the loader block that called it, and the companion ChronosConfig.auto_inference_depth / CHRONOS_AUTO_INFERENCE_DEPTH opt-outs are all removed. 2) The cumulative-dt framing behind the selector was also wrong. step_sizes has shape [recurrent_groups], not [depth], and every iteration of the loop runs all groups (chronos/model/model_chronos.py run_layer / block-order loop). Summing dt[:d] across groups is not a cumulative Euler step over iterations, so the selector would be wrong even if it had seen the right array. 3) Greedy verify applied no repetition_penalty. The draft used pick(row), which applied the penalty before argmax; verify read argmax(row) on raw logits. Under penalty > 1 the two always disagreed on any seen token. Verify now applies the same CTRL penalty on the same seen vector before its argmax. Also corrects CHANGELOG attribution: the 0.129 / 0.553 / 0.220 / 0.692 numbers were measured on the local 30M bilingual CPT run (latest.state.pkl, step 3559, export_prefix chronos_30m_d4_top2_ bilingual_cpt1b), not on the shipped 50M en-zh SFT demo model. The quoted 'water' continuation under rep=1.15 no longer matches the probe output either — removed. What remains in 0.3.4: - repetition_penalty threaded through speculative_generate, generate_stream, the serving adapter, and the Ollama/OpenAI HTTP layer. Default 1.0. CTRL rule applied on raw logits in both pick() and greedy verify. - max_inference_depth is kept in INFERENCE_OVERRIDE_KEYS as an explicit manual override (inference_overrides={'max_inference_depth': d}). Tests: tests/test_0_3_4_decoding.py rewritten against the real model (no fake config). Confirmed to catch bug #3 against the pre-fix speculative.py (3 of 8 cases fail). Full suite minus the pre-existing MLX long-context tolerance failures: 691 passed, 1 skipped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes three defects that shipped in #61 (
26f3bb4). Land this before tagging v0.3.4.Defects
auto_select_inference_depthnever ran on a real checkpoint. It readconfig.step_sizes, but the trained schedule is therecurrent_controller.step_sizesparameter in the state dict.ChronosConfighas no such attribute, so the selector returnedNoneon every real load. The 0.3.4: repetition_penalty + auto max_inference_depth (decoding-only) #61 tests passed only because they setstep_sizeson a fake config.step_sizeshas shape[recurrent_groups], not[depth], and every loop iteration runs all groups. Summingdt[:d]is not a per-iteration cumulative step.repetition_penalty. Draftpick()took argmax after the penalty, but verify took argmax of raw logits. Underpenalty > 1they disagreed on every seen token.Changes
auto_select_inference_depth,_effective_dt,AUTO_DEPTH_DT_LIMIT, the loader auto-pick block,ChronosConfig.auto_inference_depth, andCHRONOS_AUTO_INFERENCE_DEPTH.max_inference_depthstays inINFERENCE_OVERRIDE_KEYSas a manual override.unique_ratiofigures come from the local 30M bilingual CPT checkpoint (step 3559), not the shipped 50M en-zh SFT demo model. A quoted continuation that the probe output does not contain was removed.Tests
tests/test_0_3_4_decoding.pywas rewritten against the real model. A new case checks that greedy speculative decoding with penalty matches token-by-token penalized greedy. Against 0.3.4: repetition_penalty + auto max_inference_depth (decoding-only) #61'sspeculative.py, 3 of its 8 cases fail.test_long_context.py::test_chunked_ce_equals_full_logits_stage_lossalso fails on 0.3.3 head, so it is not caused by this change.After merge
gh release create v0.3.4 --target main --title 0.3.4 --notes-file CHANGELOG.md→pypi.ymlpublishes.🤖 Generated with Claude Code